using System.Collections.Generic;
using ECommerce.Web.NHibernate.Sessions;
using ECommerce.Web.ViewModels;
using NHibernate.Linq;

namespace ECommerce.Web.ViewQueries
{
    public interface ITopLevelCategoriesViewQuery
    {
        IEnumerable<TopLevelCategoriesView> GetQuery();
    }

    public class TopLevelCategoriesViewQuery : ITopLevelCategoriesViewQuery
    {
        public IEnumerable<TopLevelCategoriesView> GetQuery()
        {
            return SessionSource.Current.GetSession().Linq<TopLevelCategoriesView>();
        }
    }
}